print("hello lua!!")

a={1, 2}
b = a
print(a==b, a~=b)

a={1, 2}
b={1, 2}
print(a==b, a~=b)

a,b=1, 2
a,b=b,a
print(a)
print(b)

print(math.abs(-1));

attr={1, 2, 3, "the", "sun"}

for k,v in pairs(attr) do print(k, v) end

table={}
table["first"]={"everest", "java"}--数组下标从1开始
print(table.first[1].." "..table.first[2])
for k,v in ipairs(table.first) do print(k,v) end

table={}
table[0]="index 0"
table["bar"]=22
print(table[0])
print(table[1])
--for key,value in table do print(key,value) end

print("连接".."字符串"..2^3)
print(type(2))

--while循环
i=0
print("while循环例子")
while i<5
do 
print(i);
i=i+1 
end

--repeat循环
i=0
print("repeat循环例子")
repeat
print(i)
i=i+1
until i>=5


--for循环
print("for循环例子")
for i=0,5,1
do
print(i)
end

T1={}
T1[1] = 10
print(T1[1])

function fun(a,b,...)
print(a)
print(b)
print(arg[1])
print(arg[2])
print(arg[3])
return
end

a,b=2,3
fun(a,b,200,400,500)
